﻿@{
    ViewBag.Title = "Register Offline Subscriber";
}

<h2>Register Offline Subscriber</h2>

@model EagleProject.Models.FormAgentCreateSubscriber

@{
    ViewBag.Title = "Register Offline Subscriber";
}
@using (Html.BeginForm("RegisterForm", "Agent", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Register Subscriber Form</legend>
        <ol>
            <li>
                <label for="CardType">Card Type</label>
                @Html.DropDownList("CardType", ViewBag.ListCard as SelectList)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.FirstName)
                @Html.TextBoxFor(m => m.RegistrationForm.FirstName)
                @Html.ValidationMessageFor(m => m.RegistrationForm.FirstName)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.MiddleName)
                @Html.TextBoxFor(m => m.RegistrationForm.MiddleName)
                @Html.ValidationMessageFor(m => m.RegistrationForm.MiddleName)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.Lastname)
                @Html.TextBoxFor(m => m.RegistrationForm.Lastname)
                @Html.ValidationMessageFor(m => m.RegistrationForm.Lastname)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.Gender)
                @Html.RadioButtonFor(m => m.RegistrationForm.Gender, "true") Male
                @Html.RadioButtonFor(m => m.RegistrationForm.Gender, "false") Female             
                @Html.ValidationMessageFor(m => m.RegistrationForm.Gender)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.Email)
                @Html.TextBoxFor(m => m.RegistrationForm.Email)
                @Html.ValidationMessageFor(m => m.RegistrationForm.Email)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.ContactAddress)
                @Html.TextBoxFor(m => m.RegistrationForm.ContactAddress)
                @Html.ValidationMessageFor(m => m.RegistrationForm.ContactAddress)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.DOB)
                @Html.TextBoxFor(m => m.RegistrationForm.DOB)
                @Html.ValidationMessageFor(m => m.RegistrationForm.DOB)
            </li>
            <li>
                <label for="StateOrginID">State</label>
                @Html.DropDownList("StateOrginID", ViewBag.ListState as SelectList, "All", new { id = "StateOrginID" })
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.LGAOriginID)
                @Html.DropDownList("LGAOriginID", ViewBag.ListLGAs as SelectList, "Select Local Gov Area", new { id = "LGAOriginID" })
                @Html.ValidationMessageFor(m => m.RegistrationForm.LGAOriginID)
            </li>
            <li>
                <label for="StateCurrentID">State</label>
                @Html.DropDownList("StateCurrentID", ViewBag.ListState as SelectList, "All", new { id = "StateCurrentID" })
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.LGACurrentID)
                @Html.DropDownList("LGACurrentID", ViewBag.ListLGAs as SelectList, "Select Local Gov Area", new { id = "LGACurrentID" })
                @Html.ValidationMessageFor(m => m.RegistrationForm.LGACurrentID)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.CountryResidentID)
                @Html.DropDownListFor(m => m.RegistrationForm.CountryResidentID, (SelectList)ViewBag.ListCountry, "Select Country")
                @Html.ValidationMessageFor(m => m.RegistrationForm.CountryResidentID)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.CountryCityzenID)
                @Html.DropDownListFor(m => m.RegistrationForm.CountryCityzenID, (SelectList)ViewBag.ListCountry, "Select Country")
                @Html.ValidationMessageFor(m => m.RegistrationForm.CountryCityzenID)
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.RegistrationForm.MaritalStatus)</div>
                <div class="tbl-next">@Html.DropDownListFor(m => m.RegistrationForm.MaritalStatus, (SelectList)ViewBag.ListMarialStatus, "Select Marial Status")</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.RegistrationForm.MaritalStatus)</div>
                <div class="clear"></div>
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.Occupation)
                @Html.TextBoxFor(m => m.RegistrationForm.Occupation)
                @Html.ValidationMessageFor(m => m.RegistrationForm.Occupation)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.BloodGroup)
                @Html.TextBoxFor(m => m.RegistrationForm.BloodGroup)
                @Html.ValidationMessageFor(m => m.RegistrationForm.BloodGroup)
            </li>
        </ol>
    </fieldset>
    <fieldset>
        <legend>Personal Doctor Information</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.PD_Name)
                @Html.TextBoxFor(m => m.RegistrationForm.PD_Name)
                @Html.ValidationMessageFor(m => m.RegistrationForm.PD_Name)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.PD_ContactNumber)
                @Html.TextBoxFor(m => m.RegistrationForm.PD_ContactNumber)
                @Html.ValidationMessageFor(m => m.RegistrationForm.PD_ContactNumber)
            </li>
        </ol>
    </fieldset>
    <fieldset>
        <legend>Next Kin Information</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.NK_Name)
                @Html.TextBoxFor(m => m.RegistrationForm.NK_Name)
                @Html.ValidationMessageFor(m => m.RegistrationForm.NK_Name)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.NK_ContactNumber)
                @Html.TextBoxFor(m => m.RegistrationForm.NK_ContactNumber)
                @Html.ValidationMessageFor(m => m.RegistrationForm.NK_ContactNumber)
            </li>
            <li>
                @Html.LabelFor(m => m.RegistrationForm.NK_Address)
                @Html.TextBoxFor(m => m.RegistrationForm.NK_Address)
                @Html.ValidationMessageFor(m => m.RegistrationForm.NK_Address)
            </li>
        </ol>
    </fieldset>
    <fieldset>
        <legend>Login Information</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.CommonUser.Username)
                @Html.TextBoxFor(m => m.CommonUser.Username)
                @Html.ValidationMessageFor(m => m.CommonUser.Username)
            </li>
        </ol>
    </fieldset>
    <input type="submit" name="Submit" id="Submit" value="Register" />
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")"></script>
<script src="@Url.Content("~/DataScript/webApi.js")"></script>
<script>
    @*function registerUpdate(thisid, otherid, emptyString, apiUrl) {*@
    apiUrl = '@Url.Content("~/api/lga/")';
    registerUpdate('StateOrginID', 'LGAOriginID', 'Select Local Gov Area', apiUrl);
    registerUpdate('StateCurrentID', 'LGACurrentID', 'Choose Local Gov Area', apiUrl);
</script>


